package main

import (
	"fmt"
	"sync"
	"time"
)

func main() {
	group := sync.WaitGroup{}
	group.Add(1)
	go func() {
		for i := 0; i < 10; i++ {
			fmt.Println(i, "你好 golang")
			time.Sleep(time.Millisecond * 100)
		}
		group.Done()
	}()
	for i := 0; i < 10; i++ {
		fmt.Println(i, "hello golang")
		time.Sleep(time.Millisecond * 50)
	}
	group.Wait()
}
